-
Notifications
You must be signed in to change notification settings - Fork 327
Opdata 3775 add functionality query decimals #4107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opdata 3775 add functionality query decimals #4107
Conversation
🦋 Changeset detectedLatest commit: efd127b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This is not really a good idea because we are trying to inject some contract specific logic into a generic piece of code. @mmcallister-cll @dskloetc Any ideas on how we should do this? Maybe put the decimal abi into input and have a result2 in output? |
|
Yeah, agree with @mxiao-cll, we shouldn't call this for every base function call, we can't guarantee every contract will have decimals My initial ideas are:
{
"endpoint": "function-with-decimals"
...
}
|
My preference is closest to this. But I would suggest a record/map where the results are returned under the same keys as the inputs. So the input could be something like: And then the result would be of the shape: But we could put anything else in However, I can also see how it would be beneficial to have the |
Contracts in RDD that do not support decimals() |
packages/sources/view-function-multi-chain/src/endpoint/function.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/test/integration/adapter.test.ts
Show resolved
Hide resolved
4673d0a to
59f380e
Compare
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/endpoint/function.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/test/integration/adapter.test.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
packages/sources/view-function-multi-chain/src/transport/function-common.ts
Outdated
Show resolved
Hide resolved
|
Waiting for David's review |
Closes #OPDATA 3775 - Step 1
Description
Add functionality to query decimals from contract and return it as part of the result
Steps to Test
yarn test packages/source/view-function-multi-chain/test
Input
Output
Quality Assurance
infra-k8sconfiguration file.adapter-secretsconfiguration file or update the soak testing blacklist.test-payload.jsonfile with relevant requests.feature/x,chore/x,release/x,hotfix/x,fix/x) or is created from Jira.